package pers.xhh.frontapi.service;

import com.baomidou.mybatisplus.extension.service.IService;
import pers.xhh.frontapi.common.Mi;
import pers.xhh.frontapi.entity.MiReceiverEntity;
import pers.xhh.frontapi.entity.to.receiver.MiReceiverPutTo;
import pers.xhh.frontapi.entity.to.receiver.MiReceiverTo;

/**
 * @author wei-xhh
 * @date 2020-11-22
 */
public interface MiReceiverService extends IService<MiReceiverEntity> {

    /**
     * 添加地址
     * @param miReceiverTo 参数
     * @return 结果
     */
    Mi addReceiver(MiReceiverTo miReceiverTo);

    /**
     * 修改地址
     * @param receiverId 修改的id
     * @param miReceiverTo 参数
     * @return 结果
     */
    Mi updateReceiver(Integer receiverId, MiReceiverPutTo miReceiverTo);

    /**
     * 删除地址
     * @param receiverId 地址
     * @return 结果
     */
    Mi deleteReceiver(Integer receiverId);

    /**
     * 获取该用户的所有地址
     * @return 结果
     */
    Mi getAllReceiver();
}
